home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr48 / vericard.zip / VERICARD.DOC < prev    next >
Text File  |  1993-04-19  |  3KB  |  79 lines

  1.  
  2.  
  3.       Hello:
  4.  
  5.       I hope that you can find a use for my little program VC.EXE
  6.       and hopefully also the included source code. What VC does is
  7.       check and validate credit card numbers against the internally
  8.       encoded 'Modulo-10 Check digit' information that is in every
  9.       credit card. I wont go into details here about how that works
  10.       the source should be adequate documentation. If anyone wants
  11.       that drop me a line and we'll see what we can do!
  12.  
  13.       To use VC just type 'VC' at the DOS command line, and then
  14.       answer the prompt for a card number with a valid one. You can
  15.       include the hyphens or spaces in the card number, but it is
  16.       not necessary to do so.
  17.  
  18.       To use VC in one of your Turbo Pascal programs just include
  19.       the name Vericard in your 'uses' statement and then call the
  20.       routine as follows:
  21.  
  22.  
  23.   Program Check_4_Bogus;
  24.  
  25.   Uses dos,crt,Vericard;
  26.  
  27.   var
  28.    card : string[18];
  29.       k : char;
  30.  
  31.    Begin
  32.   clrscr;
  33.   fillchar(Card,18,#0);
  34.   Writeln('VC: Integer Modulo-10 Visa/Mastercard/Amex Check-Digit');
  35.   Writeln('    verification routine. (c) 1990 Daniel J. Karnes');
  36.   Writeln;
  37.   Write('    Please enter a Credit Card number: ');
  38.   Readln(card);
  39.  
  40.     writeln;
  41.     writeln;
  42.  
  43.   k:=Vc(card);   { <--- This calls VC up }
  44.  
  45.   case k of
  46.  
  47.   #0  : Writeln('    Could NOT verify this number with any card type.');
  48.   '3' : Writeln('    Card was verified as a valid American Express Card Number.');
  49.   '4' : Writeln('    Card was verified as a valid VISA Card Number.');
  50.   '5' : Writeln('    Card was verified as a valid Mastercard Number.');
  51.  
  52.    end;
  53.  
  54.      end.
  55.  
  56.  
  57.    VC  will return a character that is equal to the first character in the
  58.    card number or a null if the card is invalid in any way. VC should work
  59.    with any credit card, but in this example it is only testing for Visa,
  60.    M/C, and Amex.
  61.  
  62.    If there are any problems that you find with this program please report
  63.    them to me so that I can do something about it. Also if you use this, I
  64.    do ask that you understand you are doing so at your own risk!
  65.  
  66.    If you find this program useful and continue to use it I would truly be
  67.    thankful if you would send me $5.00 or WHATEVER you feel this little
  68.    program is worth. If you are using this is a business situation the $5
  69.    is mandatory. Although I have been working in the field for a long
  70.    time this is the first PD program that I have asked this of. If I get
  71.    (any?) response I will continue to develop this and other concepts in
  72.    the near future. Please enjoy, and I do hope this is of use to you!
  73.  
  74.  
  75.                                      Daniel J. Karnes
  76.                                      1 Baron Park #20
  77.                                      Burlington, MA 01803
  78.  
  79.                                      CIS: 71240,3407